.editor-inner {
  @apply relative flex;

  textarea {
    @apply border-none rounded-none bg-transparent p-0 resize-none;

    box-shadow: none;
  }
}

.absolute-modal {
  overflow: auto;
  background: var(--ls-primary-background-color);

  &.is-overflow-vw-x {
    transform: translateX(calc(-100% + 1rem));
  }

  &.is-overflow-vh-y {
    transform: translateY(calc(-100% - 2rem));
  }

  &[data-modal-name] {
    @apply bg-popover border overflow-x-hidden overflow-y-auto rounded-lg py-1;
  }
}

.is-mobile {
  .absolute-modal {
    &.is-overflow-vw-x {
      transform: translateX(-1%);
    }
  }
}

.non-block-editor textarea,
pre {
  display: block;
  padding: 0.5rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.02);
  border-radius: 4px;
}

.non-block-editor textarea {
  background: #f6f8fa;
  background: var(--ls-secondary-background-color);
}

/* Fix autocomplete preview  */
.preview-trigger-wrapper > [data-tooltipped] {
  display: block !important;
}

#time-repeater {
  min-width: 300px;

  @screen sm {
    width: 135px;
  }
}

.ui__popover-content, .ui__dropdown-menu-content {
  &[data-editor-popup-ref] {
    @apply p-1.5 w-72;

    &[data-side=top] {
      position: relative;
      top: -18px;
    }
  }

  &[data-editor-popup-ref=commands] {
    @apply w-72;

    &[data-side=top] {
      max-height: min(calc(var(--radix-popover-content-available-height) - 60px), 460px);
    }

    &[data-side=bottom] {
      max-height: min(calc(var(--radix-popover-content-available-height) - 20px), 480px);
    }
  }

  &[data-editor-popup-ref=page-search],
  &[data-editor-popup-ref=block-search],
  &[data-editor-popup-ref=page-search-hashtag] {
    @apply w-full sm:w-128;
  }

  &[data-editor-popup-ref=datepicker] {
    @apply w-auto;
  }
}

.cp__commands-slash {
  .ui__icon {
    opacity: .7;
    margin-right: 1px;
    color: inherit !important;

    &.ls-icon-queryCode {
      @apply relative left-[1px];
    }
  }

  .menu-link {
    &.chosen .ui__icon {
      @apply opacity-100;
    }
  }
}
